/*
 Navicat Premium Dump SQL

 Source Server         : 172.172.2.201
 Source Server Type    : MySQL
 Source Server Version : 80406 (8.4.6)
 Source Host           : 172.172.2.201:3306
 Source Schema         : med_sys_db

 Target Server Type    : MySQL
 Target Server Version : 80406 (8.4.6)
 File Encoding         : 65001

 Date: 15/08/2025 10:48:58
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_address
-- ----------------------------
DROP TABLE IF EXISTS `sys_address`;
CREATE TABLE `sys_address` (
  `address_id` bigint NOT NULL,
  PRIMARY KEY (`address_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_address
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
  `dept_id` int NOT NULL COMMENT '部门编号',
  `dept_contact` varchar(255) DEFAULT NULL COMMENT '联系电话',
  `dept_name` varchar(255) DEFAULT NULL COMMENT '部门名称',
  `dept_no` varchar(255) DEFAULT NULL COMMENT '部门编码',
  `description` varchar(255) DEFAULT NULL COMMENT '部门描述',
  `manager_id` bigint DEFAULT NULL,
  `parent_id` bigint DEFAULT NULL,
  `hospital_id` int DEFAULT NULL COMMENT '隶属单位编号',
  PRIMARY KEY (`dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_dept
-- ----------------------------
BEGIN;
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (1, '010-12345671', '内科', 'DEPT001', '负责心血管、呼吸、消化等系统疾病的诊疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (2, '010-12345672', '外科', 'DEPT002', '负责普外、骨外、泌尿等手术治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (3, '010-12345673', '妇产科', 'DEPT003', '妇科与产科合并科室，提供女性健康服务', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (4, '010-12345674', '儿科', 'DEPT004', '负责儿童疾病诊治与保健', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (5, '010-12345675', '急诊科', 'DEPT005', '24小时接诊急危重症患者', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (6, '010-12345676', '重症医学科', 'DEPT006', 'ICU，负责危重病人监护治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (7, '010-12345677', '麻醉科', 'DEPT007', '负责手术麻醉与疼痛管理', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (8, '010-12345678', '医学影像科', 'DEPT008', 'X光、CT、MRI、超声等影像检查', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (9, '010-12345679', '检验科', 'DEPT009', '血液、生化、微生物等实验室检测', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (10, '010-12345680', '药剂科', 'DEPT010', '药品管理、处方审核与调配', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (11, '010-12345681', '病理科', 'DEPT011', '组织病理学诊断', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (12, '010-12345682', '口腔科', 'DEPT012', '口腔疾病诊疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (13, '010-12345683', '眼科', 'DEPT013', '眼病诊断与治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (14, '010-12345684', '耳鼻喉科', 'DEPT014', '耳、鼻、喉疾病诊治', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (15, '010-12345685', '皮肤科', 'DEPT015', '皮肤病与性病诊疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (16, '010-12345686', '中医科', 'DEPT016', '中医诊疗与康复治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (17, '010-12345687', '心理科', 'DEPT017', '心理障碍、情绪问题咨询与治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (18, '010-12345688', '康复医学科', 'DEPT018', '术后康复、神经康复、理疗等', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (19, '010-12345689', '营养科', 'DEPT019', '营养评估与膳食指导', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (20, '010-12345690', '感染科', 'DEPT020', '肝炎、结核、艾滋病等传染病诊治', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (21, '010-12345691', '肿瘤科', 'DEPT021', '恶性肿瘤的化疗与综合治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (22, '010-12345692', '放射治疗科', 'DEPT022', '肿瘤放疗计划与实施', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (23, '010-12345693', '血液净化中心', 'DEPT023', '肾功能衰竭患者的透析治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (24, '010-12345694', '内镜中心', 'DEPT024', '胃肠镜、支气管镜等检查与治疗', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (25, '010-12345695', '健康管理中心', 'DEPT025', '体检、健康评估与干预', NULL, 0, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (26, '010-12345696', '心血管内科', 'DEPT026', '高血压、冠心病等心脏血管疾病', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (27, '010-12345697', '呼吸内科', 'DEPT027', '肺炎、哮喘、慢阻肺等呼吸道疾病', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (28, '010-12345698', '消化内科', 'DEPT028', '胃炎、肝炎、消化性溃疡等', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (29, '010-12345699', '神经内科', 'DEPT029', '脑卒中、癫痫、帕金森等神经系统疾病', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (30, '010-12345700', '肾内科', 'DEPT030', '肾炎、肾功能不全、透析管理', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (31, '010-12345701', '内分泌科', 'DEPT031', '糖尿病、甲状腺疾病等内分泌代谢病', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (32, '010-12345702', '血液内科', 'DEPT032', '贫血、白血病、淋巴瘤等血液系统疾病', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (33, '010-12345703', '风湿免疫科', 'DEPT033', '类风湿关节炎、红斑狼疮等免疫性疾病', NULL, 1, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (34, '010-12345704', '普通外科', 'DEPT034', '阑尾、疝气、甲状腺等普外手术', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (35, '010-12345705', '骨科', 'DEPT035', '骨折、关节置换、脊柱手术', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (36, '010-12345706', '泌尿外科', 'DEPT036', '肾结石、前列腺疾病等泌尿系统手术', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (37, '010-12345707', '神经外科', 'DEPT037', '脑外伤、脑肿瘤等神经外科手术', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (38, '010-12345708', '胸外科', 'DEPT038', '肺、食管、纵隔等胸部手术', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (39, '010-12345709', '心脏外科', 'DEPT039', '心脏瓣膜、冠脉搭桥等手术', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (40, '010-12345710', '烧伤整形外科', 'DEPT040', '烧伤治疗与整形美容手术', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (41, '010-12345711', '乳腺外科', 'DEPT041', '乳腺肿瘤、乳腺炎等外科治疗', NULL, 2, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (42, '010-12345712', '妇科', 'DEPT042', '子宫肌瘤、卵巢囊肿等妇科疾病', NULL, 3, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (43, '010-12345713', '产科', 'DEPT043', '孕期管理、分娩接生、产后护理', NULL, 3, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (44, '010-12345714', '生殖医学科', 'DEPT044', '不孕不育、试管婴儿等辅助生殖技术', NULL, 3, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (45, '010-12345715', '新生儿科', 'DEPT045', '早产儿、新生儿疾病监护与治疗', NULL, 4, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (46, '010-12345716', '小儿内科', 'DEPT046', '儿童常见病、多发病诊治', NULL, 4, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (47, '010-12345717', '放射科', 'DEPT047', 'X光、CT、MRI检查', NULL, 8, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (48, '010-12345718', '超声科', 'DEPT048', 'B超、彩超检查', NULL, 8, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (49, '010-12345719', '核医学科', 'DEPT049', 'PET-CT、放射性核素治疗', NULL, 8, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (50, '010-12345720', '口腔颌面外科', 'DEPT050', '口腔肿瘤、颌面创伤手术', NULL, 12, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (51, '010-12345721', '牙体牙髓科', 'DEPT051', '龋齿、牙髓病治疗', NULL, 12, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (52, '010-12345722', '正畸科', 'DEPT052', '牙齿矫正、牙列不齐治疗', NULL, 12, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (53, '010-12345723', '冠心病介入组', 'DEPT053', '冠状动脉造影与支架植入', NULL, 26, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (54, '010-12345724', '心律失常组', 'DEPT054', '房颤、起搏器植入等治疗', NULL, 26, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (55, '010-12345725', '高血压病组', 'DEPT055', '原发性与继发性高血压诊治', NULL, 26, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (56, '010-12345726', '胃肠外科', 'DEPT056', '胃癌、结肠癌等胃肠道手术', NULL, 34, NULL);
INSERT INTO `sys_dept` (`dept_id`, `dept_contact`, `dept_name`, `dept_no`, `description`, `manager_id`, `parent_id`, `hospital_id`) VALUES (57, '010-12345727', '肝胆胰外科', 'DEPT057', '肝癌、胆管结石、胰腺炎手术', NULL, 34, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_hospital
-- ----------------------------
DROP TABLE IF EXISTS `sys_hospital`;
CREATE TABLE `sys_hospital` (
  `hospital_id` int NOT NULL COMMENT '医院ID',
  `branch` varchar(255) DEFAULT NULL,
  `hospital_name` varchar(255) DEFAULT NULL COMMENT '医院名称',
  PRIMARY KEY (`hospital_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_hospital
-- ----------------------------
BEGIN;
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (1, '本部', '魔都市第一人民医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (2, '东院区', '魔都市第一人民医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (3, '西院区', '魔都市第一人民医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (4, '总院', '魔都市中心医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (5, '新城区分院', '魔都市中心医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (6, '本部', '魔都市中医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (7, '南院区', '魔都市中医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (8, '国际医疗中心', '魔都市中医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (9, '本部', '魔都市妇幼保健院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (10, '儿童医学中心', '魔都市妇幼保健院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (11, '临床院区', '魔都大学附属医院');
INSERT INTO `sys_hospital` (`hospital_id`, `branch`, `hospital_name`) VALUES (12, '教学科研院区', '魔都大学附属医院');
COMMIT;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `menu_id` bigint NOT NULL COMMENT '菜单ID',
  `component` varchar(255) DEFAULT NULL COMMENT '组件路径',
  `icon` varchar(255) DEFAULT NULL COMMENT '菜单图标',
  `menu_name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
  `menu_type` int DEFAULT NULL COMMENT '菜单类型（0目录 1菜单 2按钮）',
  `parent_id` int DEFAULT NULL COMMENT '父菜单ID',
  `path` varchar(200) DEFAULT NULL COMMENT '路由地址',
  `perms` varchar(255) DEFAULT NULL COMMENT '权限标识',
  `query_param` varchar(255) DEFAULT NULL COMMENT '路由参数',
  `status` int DEFAULT NULL COMMENT '菜单状态（0正常 1停用）',
  `visible` int DEFAULT NULL COMMENT '显示状态（0显示 1隐藏）',
  `is_cache` int DEFAULT NULL COMMENT '是否缓存（0缓存 1不缓存）',
  `is_frame` int DEFAULT NULL COMMENT '是否为外链（0是 1否）',
  `order_num` int DEFAULT NULL COMMENT '显示顺序',
  `remark` varchar(200) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (100, NULL, 'system', '系统管理', 0, 0, '/system', NULL, NULL, 0, 0, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (101, 'system/user/index', 'user', '用户管理', 1, 100, 'user', 'system:user:list', NULL, 0, 0, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (102, 'system/role/index', 'peoples', '角色管理', 1, 100, 'role', 'system:role:list', NULL, 0, 0, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (103, 'system/menu/index', 'tree', '菜单管理', 1, 100, 'menu', 'system:menu:list', NULL, 0, 0, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (104, '', 'tree', '菜单修改', 2, 103, 'menu', 'system:menu:edit', NULL, 0, 1, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (105, '', 'tree', '菜单删除', 2, 103, 'menu', 'system:menu:remove', NULL, 0, 1, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (107, '', 'tree', '菜单查询', 2, 103, 'menu', 'system:menu:query', NULL, 0, 1, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (108, '', 'tree', '菜单新增', 2, 103, 'menu', 'system:menu:add', NULL, 0, 1, 0, 1, 0, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (109, NULL, NULL, '角色查询', 2, 102, NULL, 'system:role:query', NULL, 0, 0, 0, 1, 1, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (110, NULL, NULL, '角色删除', 2, 102, NULL, 'system:role:remove', NULL, 0, 0, 0, 1, 2, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (111, 'system/dept/index', NULL, '部门管理1', 1, 100, 'dept', 'system:dept:list', NULL, 0, 0, 0, 1, 1, NULL);
INSERT INTO `sys_menu` (`menu_id`, `component`, `icon`, `menu_name`, `menu_type`, `parent_id`, `path`, `perms`, `query_param`, `status`, `visible`, `is_cache`, `is_frame`, `order_num`, `remark`) VALUES (112, NULL, NULL, '部门查询', 2, 111, NULL, 'system:dept:query', NULL, 0, 0, 0, 1, 1, NULL);
COMMIT;

-- ----------------------------
-- Table structure for sys_patient
-- ----------------------------
DROP TABLE IF EXISTS `sys_patient`;
CREATE TABLE `sys_patient` (
  `patient_id` int NOT NULL COMMENT '就诊人ID',
  `address_id` int DEFAULT NULL,
  `patient_birth` varchar(255) DEFAULT NULL COMMENT '出生日期',
  `patient_contact` varchar(255) DEFAULT NULL COMMENT '联系方式',
  `patient_gender` int DEFAULT NULL COMMENT '就诊人性别0男1女 2未知',
  `patient_name` varchar(255) DEFAULT NULL COMMENT '就诊人姓名',
  PRIMARY KEY (`patient_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_patient
-- ----------------------------
BEGIN;
INSERT INTO `sys_patient` (`patient_id`, `address_id`, `patient_birth`, `patient_contact`, `patient_gender`, `patient_name`) VALUES (2001, 1001, '1985-06-15', '13800000001', 0, '赵六');
INSERT INTO `sys_patient` (`patient_id`, `address_id`, `patient_birth`, `patient_contact`, `patient_gender`, `patient_name`) VALUES (2002, 1002, '1990-09-20', '13800000002', 1, '孙七');
INSERT INTO `sys_patient` (`patient_id`, `address_id`, `patient_birth`, `patient_contact`, `patient_gender`, `patient_name`) VALUES (2003, 1003, '2001-12-01', '13800000003', 2, '周八');
COMMIT;

-- ----------------------------
-- Table structure for sys_position
-- ----------------------------
DROP TABLE IF EXISTS `sys_position`;
CREATE TABLE `sys_position` (
  `position_id` int NOT NULL AUTO_INCREMENT,
  `position_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`position_id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_position
-- ----------------------------
BEGIN;
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (1, '院长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (2, '副院长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (3, '党委书记');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (4, '党委副书记');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (5, '纪委书记');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (6, '医务处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (7, '护理部主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (8, '人事处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (9, '财务处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (10, '科研处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (11, '教学处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (12, '院感控制处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (13, '信息中心主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (14, '后勤保障处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (15, '设备管理处处长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (16, '药学部主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (17, '门诊部主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (18, '病案管理科主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (19, '质控办公室主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (20, '科主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (21, '副主任');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (22, '护士长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (23, '医疗组长');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (24, '教学秘书');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (25, '科研秘书');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (26, '感控专员');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (27, '行政干事');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (28, '临床药师');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (29, '主治医师（岗位）');
INSERT INTO `sys_position` (`position_id`, `position_name`) VALUES (30, '住院总医师');
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `role_id` bigint NOT NULL,
  `authrization` varchar(255) DEFAULT NULL,
  `role_name` varchar(255) DEFAULT NULL,
  `role_status` varchar(255) DEFAULT NULL,
  `role_key` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` (`role_id`, `authrization`, `role_name`, `role_status`, `role_key`) VALUES (1, 'admin', '超级管理员', '0', 'admin');
INSERT INTO `sys_role` (`role_id`, `authrization`, `role_name`, `role_status`, `role_key`) VALUES (2, 'DOCTOR', '医生', '0', 'DOCTOR');
INSERT INTO `sys_role` (`role_id`, `authrization`, `role_name`, `role_status`, `role_key`) VALUES (3, 'NURSE', '护士', '0', 'NURSE');
COMMIT;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `id` bigint NOT NULL,
  `role_id` bigint NOT NULL,
  `menu_id` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10003, 1, 100);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10002, 2, 101);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10003, 1, 103);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10004, 3, 100);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10005, 3, 101);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10006, 1, 104);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10007, 1, 105);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10008, 1, 107);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10009, 1, 108);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10010, 1, 101);
INSERT INTO `sys_role_menu` (`id`, `role_id`, `menu_id`) VALUES (10011, 1, 102);
COMMIT;

-- ----------------------------
-- Table structure for sys_staff
-- ----------------------------
DROP TABLE IF EXISTS `sys_staff`;
CREATE TABLE `sys_staff` (
  `staff_id` bigint NOT NULL,
  `dept_id` int DEFAULT NULL,
  `join_date` datetime DEFAULT NULL COMMENT '入职时间',
  `position_id` int DEFAULT NULL,
  `staff_name` varchar(255) DEFAULT NULL COMMENT '员工姓名',
  `staff_status` tinyint DEFAULT NULL,
  `title_id` int DEFAULT NULL,
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `updater` varchar(255) DEFAULT NULL COMMENT '更新人',
  `user_id` bigint DEFAULT NULL,
  `hospital_id` int DEFAULT NULL,
  PRIMARY KEY (`staff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_staff
-- ----------------------------
BEGIN;
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (1, 2, NULL, 2, '张伟', 1, 1, NULL, NULL, NULL, 1);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (2, 2, NULL, 4, '李华', 1, 3, NULL, NULL, NULL, 1);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (3, 2, NULL, 4, '王丽', 1, 4, NULL, NULL, NULL, 1);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (4, 3, NULL, 4, '赵强', 1, 3, NULL, NULL, NULL, 1);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (5, 3, NULL, 4, '孙敏', 1, 4, NULL, NULL, NULL, 1);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (6, 2, NULL, 4, '周涛', 1, 3, NULL, NULL, NULL, 2);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (7, 2, NULL, 4, '吴芳', 1, 4, NULL, NULL, NULL, 2);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (8, 5, NULL, 2, '郑磊', 1, 1, NULL, NULL, NULL, 3);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (9, 5, NULL, 4, '陈静', 1, 3, NULL, NULL, NULL, 3);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (10, 6, NULL, 3, '王强', 1, 4, NULL, NULL, NULL, 4);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (11, 6, NULL, 4, '刘洋', 1, 3, NULL, NULL, NULL, 4);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (12, 5, NULL, 4, '孙磊', 1, 3, NULL, NULL, NULL, 5);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (13, 5, NULL, 4, '杨柳', 1, 4, NULL, NULL, NULL, 5);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (14, 1, NULL, 2, '朱明', 1, 1, NULL, NULL, NULL, 6);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (15, 1, NULL, 4, '何勇', 1, 3, NULL, NULL, NULL, 6);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (16, 4, NULL, 2, '高飞', 1, 1, NULL, NULL, NULL, 7);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (17, 4, NULL, 4, '罗翔', 1, 3, NULL, NULL, 1955856968354893824, 7);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (1001, 26, '2022-03-01 09:00:00', 20, '张三', 1, 4, '2025-08-13 10:00:00', 'system', 1, 1);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (1002, 12, '2023-07-15 09:00:00', 22, '李四', 1, 3, '2025-08-13 10:00:00', 'system', 2, 1);
INSERT INTO `sys_staff` (`staff_id`, `dept_id`, `join_date`, `position_id`, `staff_name`, `staff_status`, `title_id`, `update_time`, `updater`, `user_id`, `hospital_id`) VALUES (1003, 34, '2021-11-20 09:00:00', 23, '王五', 1, 2, '2025-08-13 10:00:00', 'system', NULL, 1);
COMMIT;

-- ----------------------------
-- Table structure for sys_staff_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_staff_role`;
CREATE TABLE `sys_staff_role` (
  `id` bigint NOT NULL,
  `role_id` int DEFAULT NULL,
  `staff_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_staff_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_staff_role` (`id`, `role_id`, `staff_id`) VALUES (20001, 2, 1);
INSERT INTO `sys_staff_role` (`id`, `role_id`, `staff_id`) VALUES (20002, 3, 1002);
INSERT INTO `sys_staff_role` (`id`, `role_id`, `staff_id`) VALUES (20003, 1, 1001);
INSERT INTO `sys_staff_role` (`id`, `role_id`, `staff_id`) VALUES (20004, 1, 17);
COMMIT;

-- ----------------------------
-- Table structure for sys_title
-- ----------------------------
DROP TABLE IF EXISTS `sys_title`;
CREATE TABLE `sys_title` (
  `title_id` bigint NOT NULL AUTO_INCREMENT,
  `title_code` varchar(255) DEFAULT NULL,
  `title_level` varchar(255) DEFAULT NULL,
  `title_name` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`title_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_title
-- ----------------------------
BEGIN;
INSERT INTO `sys_title` (`title_id`, `title_code`, `title_level`, `title_name`) VALUES (1, 'JUNIOR_ASSISTANT', '1', '医士');
INSERT INTO `sys_title` (`title_id`, `title_code`, `title_level`, `title_name`) VALUES (2, 'ASSISTANT_DOCTOR', '2', '医师');
INSERT INTO `sys_title` (`title_id`, `title_code`, `title_level`, `title_name`) VALUES (3, 'ATTENDING_DOCTOR', '3', '主治医师');
INSERT INTO `sys_title` (`title_id`, `title_code`, `title_level`, `title_name`) VALUES (4, 'VICE_CHIEF_PHYSICIAN', '4', '副主任医师');
INSERT INTO `sys_title` (`title_id`, `title_code`, `title_level`, `title_name`) VALUES (5, 'CHIEF_PHYSICIAN', '5', '主任医师');
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `user_id` bigint NOT NULL,
  `password` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `user_contact` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` (`user_id`, `password`, `status`, `user_contact`, `username`) VALUES (1, '$2a$10$bA/P2UpxJt2ppyZ5ezXSPOr/i9saz.vtzJoj9xV1g6KWuaeFAB0WK', NULL, '15038651933', 'admin');
INSERT INTO `sys_user` (`user_id`, `password`, `status`, `user_contact`, `username`) VALUES (2, '$2a$10$eq/htk7lxYpmpSzA5zTQw.IVFPZwJnAyLRtTENTKuwiDn.d2HYlK6', NULL, '15038651933', 'liyuxiang1');
INSERT INTO `sys_user` (`user_id`, `password`, `status`, `user_contact`, `username`) VALUES (3, '$2a$10$eq/htk7lxYpmpSzA5zTQw.IVFPZwJnAyLRtTENTKuwiDn.d2HYlK6', '1', '13900000002', 'doctor_zhang');
INSERT INTO `sys_user` (`user_id`, `password`, `status`, `user_contact`, `username`) VALUES (4, '$2a$10$eq/htk7lxYpmpSzA5zTQw.IVFPZwJnAyLRtTENTKuwiDn.d2HYlK6', '1', '13900000003', 'nurse_li');
INSERT INTO `sys_user` (`user_id`, `password`, `status`, `user_contact`, `username`) VALUES (5, '$2a$10$eq/htk7lxYpmpSzA5zTQw.IVFPZwJnAyLRtTENTKuwiDn.d2HYlK6', '1', '13900000001', 'testuser1');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_patient
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_patient`;
CREATE TABLE `sys_user_patient` (
  `id` bigint NOT NULL,
  `patient_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of sys_user_patient
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_patient` (`id`, `patient_id`, `user_id`) VALUES (30001, 2001, 1);
INSERT INTO `sys_user_patient` (`id`, `patient_id`, `user_id`) VALUES (30002, 2002, 1002);
INSERT INTO `sys_user_patient` (`id`, `patient_id`, `user_id`) VALUES (30003, 2003, 1001);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
